package com.wanwu.channel;


import com.wanwu.channel.core.util.apollo.ApolloMerchantUtil;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@EnableDubbo
@SpringBootApplication
@MapperScan("com.wanwu.channel.dao")
@EnableTransactionManagement
@EnableAsync(proxyTargetClass = true)
@ImportResource(locations = {"classpath:spring/*.xml"})
public class Application {

    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    private static ConfigurableApplicationContext context;

    public static void main(String[] args) {
        Application.context = SpringApplication.run(Application.class, args);
        logger.info("渠道启动 ");
    }

    public static ConfigurableApplicationContext getContext() {
        return context;
    }
}
